<?php
namespace app\shop\model;

use app\BaseModel;
use app\shop\model\IndexCouponRecord;
use think\facade\Db;

class ShareCouponId extends BaseModel
{
    //会员权益表
    protected $name = 'longbing_card_shop_share_coupon_id';


    /**
     * @author chenniang
     * @DataTime: 2020-09-14 17:40
     * @功能说明:增加一条信息并返回id
     */
    public function addData($data){

        $this->insert($data);

        $id = $this->getLastInsID();

        return $id;

    }


    /**
     * @author chenniang
     * @DataTime: 2020-09-15 09:55
     * @功能说明:优惠券详情
     */
    public function couponInfo($dis){

        $data = $this->where($dis)->find();

        return !empty($data)?$data->toArray():[];

    }









}